package com.lantosec.hmrp.modules.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lantosec.hmrp.modules.system.entity.SysSmsTemplate;
import com.lantosec.hmrp.modules.system.mapper.SysSmsTemplateMapper;
import com.lantosec.hmrp.modules.system.service.ISysSmsTemplateService;
import lombok.extern.log4j.Log4j2;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 短信模板配置表(待定) 服务实现类
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-19
 */
@Service
@Primary
@Log4j2
public class SysSmsTemplateServiceImpl extends ServiceImpl<SysSmsTemplateMapper, SysSmsTemplate> implements ISysSmsTemplateService {
    @Override
    public List<SysSmsTemplate> getWarningTemplate() {
        List<SysSmsTemplate> warning = baseMapper.selectList(new QueryWrapper<SysSmsTemplate>()
                .eq(String.valueOf(SysSmsTemplate.ColName.module_id), "warning"));
        return warning;
    }
}
